package com.silence.ByteDance;

import java.util.*;

public class new_judge {
    public static int solution(int m, int x) {
        // 计算第 x 个订单的编号
        return (x - 1) % m + 1;
    }

    public static void main(String[] args) {
        // 测试样例
        System.out.println(solution(2, 3) == 1);  // 输出: 1
        System.out.println(solution(5, 17) == 2); // 输出: 2
        System.out.println(solution(8, 2) == 2);  // 输出: 2
        System.out.println(solution(4, 4) == 4);  // 输出: 4
    }
}
